Skip to content

Fix #9892: Add span when translating with to an and type #9953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 7, 2020
Merged

Fix #9892: Add span when translating with to an and type #9953

merged 1 commit into from
Oct 7, 2020

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Oct 6, 2020

Fix #9892

Without adding the span it is thought to be synthetic, which causes scalaJS to throw an error.

@tgodzik tgodzik requested a review from sjrd October 6, 2020 14:16
Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Have an awesome day! ☀️

@sjrd
Copy link
Member

sjrd commented Oct 6, 2020

I believe the best place to add a test here is to add // ok lines in the class A4 in js-native-members.scala at
https://github.com/lampepfl/dotty/blob/38ba6e18cebb3b17512da4b327406b6a8c6656d5/tests/neg-scalajs/js-native-members.scala#L54-L58

@tgodzik
Copy link
Contributor Author

tgodzik commented Oct 6, 2020

I believe the best place to add a test here is to add // ok lines in the class A4 in js-native-members.scala at

Added the test.

@tgodzik tgodzik requested review from sjrd and nicolasstucki October 6, 2020 16:15
@sjrd sjrd changed the title Add span when translating with to an and type Fix #9892: Add span when translating with to an and type Oct 6, 2020
Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tgodzik !

@sjrd
Copy link
Member

sjrd commented Oct 7, 2020

Apparently the latest changes cause several other failures. It seems that the offset of other errors in the files are displaced. Perhaps the latest changes cause an overall displacement of all the offsets in the file?

@nicolasstucki
Copy link
Contributor

Maybe try with the version that @sjrd proposed

@tgodzik
Copy link
Contributor Author

tgodzik commented Oct 7, 2020

@nicolasstucki position changes at js-native-members.check were expected and the other ones were most likely caused by the fact that we were pointing at with instead of the full type tree. Should be good now, what you think?

@nicolasstucki nicolasstucki merged commit e570ab6 into scala:master Oct 7, 2020
@nicolasstucki
Copy link
Contributor

Thank you @tgodzik

@tgodzik tgodzik deleted the fix-ant-type-synthetics branch October 7, 2020 12:29
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug with scala.js return type check and intersection types
5 participants